#pragma once
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX_NAME 20
#define MAX_SEX 10
#define MAX_TELE 12
#define MAX_ADDR 30
#define DAFAULT_SZ 3
#define INC_SZ 2

typedef struct PeoInfo
{
	char name[MAX_NAME];
	char sex[MAX_SEX];
	int age;
	char tele[MAX_TELE];
	char addr[MAX_ADDR];
}PeoInfo;

typedef struct Contact
{
	PeoInfo* data;
	int sz;
	int capacoty;
}Contact;

enum Option
{
	EXIT,
	ADD,
	DEL,
	SEARCH,
	MODIFY,
	SORT,
	PRINT,
	EMPTY
};

enum Sort
{
	NAME = 1,
	AGE
};

enum Sequence
{
	RISE = 1,
	FALL
};

void menu();

void menusort();

void menusubsequence();

void InitContact(Contact* Con);

void ContactAdd(Contact* Con);

void ContactDel(Contact* Con);

void ContactSearch(Contact* Con);

void ContactModify(Contact* Con);

void ContactSort(Contact* Con);

void ContactPrint(Contact* Con);

void DestroyContact(Contact* Con);